<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
               function ajax() {
              return new Promise((resolve, reject) => {
                setTimeout(() => {
                  resolve("success--------1--");
                }, 1000);
              });
            }
      // await 可以不配合async使用但是仅限于 script标签引入时加入
              const res=await ajax()
              console.log(res);
    </script>
  </body>
</html>
